import re
headers_str = """
content-length:154
accept:	application/json, text/plain, */*
source-client:1
x-requested-with:XMLHttpRequest
jexpress-trace-id:ndk9paga88xnaw45
content-type:application/json;charset=utf-8
event-id:orwrogpgvmn4lwjp
user-agent:	Mozilla/5.0 (Linux; Android 7.1.2; TAS-AN00 Build/TAS-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3770.143 Mobile Safari/537.36 MMWEBID/3766 MicroMessenger/8.0.3.1880(0x28000334) Process/appbrand0 WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm32 MiniProgramEnv/android
clientinfo:	{"appName":"c2c","client":"m"}
accept-encoding:gzip,compress,br,deflate
lop-dn:	logistics-mrd.jd.com
charset:utf-8
version:1626399756000
biz-type:service-monitor
appparams:{"appid":158,"ticket_type":"m"}
jexpress-report-time:1627004094890
access:	WX-XCX
app-key:jexpress
referer:https://servicewechat.com/wx73247c7819d61796/312/page-frame.html
cookie:	pt_key=AAJg-hyDADABzQH79SFfWyuSTv9qUeESkJLRYPL0LY5r3RhdeXlTQPAa5YzmXO6hk8EdER-LMOA; pin=18718896370_p;
"""

for line in headers_str.splitlines():
	# \1和\2用来匹配分组的内容
    print(re.sub('^(.*?): (.*)$',r"'\1': '\2',",line))

